<template>
  <div>
    <component :is="activeTabComponent" @getInto="handleGetInto" :rowData="rowData" />
  </div>
</template>

<script setup>
import { ref } from 'vue';
import IndexComponent from '@/components/WorkImplementation/index.vue';
import TabsMatterInfo from '@/components/Tabs/TabsMatterInfo.vue';

const activeTabComponent = ref(IndexComponent); // 初始显示的组件为 IndexComponent
const rowData = ref(null); // 存储传递给子组件的数据

const handleGetInto = (row) => {
  activeTabComponent.value = TabsMatterInfo;
  rowData.value = row; // 将数据传递给子组件
  rowData.value.router = '/index'
};
</script>
